<?php
/**
 * Created by swagger_zxd.
 * User: zxd
 * Date: 2017/11/21
 * Time: 10:51
 */

namespace App\Http\Requests\Admin\Notice;




use App\Http\Requests\Admin\FcAdminRequest;
use Illuminate\Foundation\Http\FormRequest;

class NoticeCreateRequest extends FormRequest
{
    use FcAdminRequest;

    /**
     * 定义一个权限
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * 验证规则
     * @return array
     */
    public function rules()
    {
        return [
          'content'=>'required',
          'times'=>'required|numeric',
        ];
    }

    /**
     * 提示消息
     * @return array
     */
    public function messages()
    {
        return [
           'content.required'=>'请填写通知内容',
           'times.required'=>'请填写通知次数',
            'times.numeric'=>'通知次数必须是数值',
        ];
    }


}